﻿''' <summary>
''' 包含建筑物顶部角的个数和建筑物的高度。建筑物顶部角的数据为整数，建筑物的高度为实数
''' </summary>
''' <remarks></remarks>
<Serializable()> Public Class BuildTire
    Implements ICloneable

    Private m_TireHight As Double = 20 '建筑物的高度
    Private m_ArrybuidCorner(-1) As CAermod.BuildCorner '为建筑物序列角的X-Y坐标值及TIER

    ''' <summary>
    ''' 建筑物的高度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property TireHight() As Double
        Get
            Return m_TireHight
        End Get
        Set(ByVal value As Double)
            m_TireHight = value
        End Set
    End Property
    ''' <summary>
    ''' 为建筑物序列角的X-Y坐标值及TIER
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArryBuilCorner() As CAermod.BuildCorner()
        Get
            Return m_ArrybuidCorner
        End Get
        Set(ByVal value As CAermod.BuildCorner())
            m_ArrybuidCorner = value
        End Set
    End Property
    ''' <summary>
    ''' 返回TIER字符串
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function OutBuildTire() As String
        Dim StrBuilTir As String = ""
        StrBuilTir += m_ArrybuidCorner.Length & " " '用数据长度来表示建筑物的角的个数
        StrBuilTir += Me.m_TireHight & vbCrLf
        For i As Integer = 0 To Me.m_ArrybuidCorner.Length - 1
            StrBuilTir += Me.ArryBuilCorner(i).OutBuildCorner()
        Next
        Return StrBuilTir
    End Function

    Public Function Clone() As Object Implements System.ICloneable.Clone
        Dim obj As New BuildTire
        obj.m_TireHight = Me.m_TireHight  '建筑物的高度
        ReDim obj.m_ArrybuidCorner(Me.m_ArrybuidCorner.Length - 1)
        For i As Integer = 0 To Me.m_ArrybuidCorner.Length - 1
            obj.m_ArrybuidCorner(i) = Me.m_ArrybuidCorner(i).Clone
        Next

        Return obj
    End Function
End Class
